import { LAYOUT } from '@/router/constant'

import type { AppRouteModule } from '@/router/types'

const process: AppRouteModule = {
    path: import.meta.env.VITE_PUBLIC_PATH + '/workbench',
    name: 'workbench',
    component: LAYOUT,
    meta: {
        isLayout: true,
        hideMenu: true,
        icon: 'about-dot-me',
        title: '工作台'
    },
    children: [
        {
            path: import.meta.env.VITE_PUBLIC_PATH + '/workbench',
            name: 'workbench',
            meta: {
                icon: 'layout',
                title: '工作台',
                hideMenu: true
            },
            component: () => import('@/views/system/process/index.vue')
        },
        {
            path: import.meta.env.VITE_PUBLIC_PATH + '/process',
            name: 'process',
            meta: {
                icon: 'layout',
                title: '流程中心',
                hideMenu: true
            },
            component: () => import('@/views/system/process/process/index.vue')
        },
        {
            path: import.meta.env.VITE_PUBLIC_PATH + '/process/:processInstanceId/:taskId/:processStatus',
            name: 'processDetail',
            props: true,
            meta: {
                icon: 'layout',
                title: '流程详情',
                key: 'processDetail',
                hideMenu: true
            },
            component: () => import('@/views/system/process/process/detail.vue')
        },
        {
            path: import.meta.env.VITE_PUBLIC_PATH + '/process/batchApproval',
            name: 'batchApproval',
            meta: {
                icon: 'layout',
                title: '批量审批',
                key: 'batchApproval',
                hideMenu: true
            },
            component: () => import('@/views/system/process/process/batchApproval.vue')
        }
    ]
}

export default process
